Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-eslint-parser

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-eslint-parser

The ESLint custom parser for `.vue` files.

  • 9.4.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1M
decreased by-4.21%
Maintainers
2
Weekly downloads
 
Created

What is vue-eslint-parser?

The vue-eslint-parser npm package is a parser that allows ESLint to lint .vue files' script and template sections. It is designed to parse Vue.js component files and extract the JavaScript expression inside them for ESLint to check.

What are vue-eslint-parser's main functionalities?

Parsing .vue files

This feature allows the integration of ESLint with Vue.js single-file components. The code sample shows how to configure ESLint to use vue-eslint-parser in a project's .eslintrc.js file.

module.exports = { parser: 'vue-eslint-parser', parserOptions: { parser: 'babel-eslint', sourceType: 'module', ecmaVersion: 2020 } }

Extracting script content

vue-eslint-parser extracts the script content from a .vue file, enabling ESLint to lint the JavaScript code within. The code sample is a Vue component with a template and a script section.

/* eslint-disable */ <template><div>{{ message }}</div></template><script>export default { data() { return { message: 'Hello Vue!' }; } }</script>

Supporting custom blocks

The parser can handle custom blocks in .vue files, such as style and i18n blocks, although linting these blocks may require additional plugins or configurations. The code sample includes a style block along with the template and script.

/* eslint-disable */ <template><div>{{ message }}</div></template><script>export default { data() { return { message: 'Hello Vue!' }; } }</script><style scoped>.message { color: red; }</style>

Other packages similar to vue-eslint-parser

FAQs

Package last updated on 01 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc